package com.cn.test1.servlet;

import com.cn.test1.model.HeadModel;
import com.cn.test1.model.NavModel;
import com.cn.test1.service.HeadService;
import com.cn.test1.service.NavService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet("/head")
public class HeadServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

//        HeadService headService = new HeadService();
//        HeadModel headModel = headService.getHeadModel();
//        req.setAttribute("headModel",headModel);
//        //拿到导航信息
//        List<HeadModel> headModelList = headService.getHeadModelList();
//        req.setAttribute("headModelList",headModelList);
//
//        req.getRequestDispatcher("/jsp/head.jsp").forward(req,resp);
    }
}
